 --[[
 _                     _    _       
| |                   | |  (_)      
| |____      __    ___| | ___ _ __  
| '_ \ \ /\ / /   / __| |/ / | '_ \ 
| |_) \ V  V /    \__ \   <| | | | | -- by C to the UNIT
|_.__/ \_/\_/     |___/_|\_\_|_| |_|

]]

local surface 	= surface
local draw 		= draw
local Color 	= Color

local SKIN = {}

SKIN.PrintName			= "Default basewars skin."
SKIN.Author				= "C to the UNIT or C-UNIT"

/*Frame Config*/ 		--Color(R, G, B, A( Optional ))
SKIN.Frame_Color_1		= Color(0, 0, 0, 255);
SKIN.Frame_Color_2		= Color(50, 55, 59, 255);
SKIN.Label_Color_1		= Color(255, 0, 0, 255);
SKIN.Frame_Font			= "TargetIDSmall";

/*Button Config*/
SKIN.Button_Color_1		= Color(0, 0, 0, 255);
SKIN.Button_Color_2		= Color(255, 0, 0, 255);
SKIN.B_Label_Color_1	= Color(255, 0, 0, 255);
SKIN.Button_Font		= "CenterPrintText";

/*---------------------------------------------------------
    Frame
---------------------------------------------------------*/
function SKIN:PaintFrame( PANEL ) --Thermadyle suggested I use his code for the frame, since it looked nice.
	local x, y = PANEL:GetWide(), PANEL:GetTall()

	PANEL.lblTitle:SetFont( self.Frame_Font )
	PANEL.lblTitle:SetPos(8, 2)
	PANEL.lblTitle:SetSize(x - 20, 20)
	PANEL.lblTitle:SetColor( self.Label_Color_1 )

	draw.RoundedBox(0, 0, 0, x, y, Color(40, 40, 40, 255))
	draw.RoundedBox(4, 1, 22, x - 2, y - 23, Color(90, 90, 90, 255))
		 
	for i = 1, 20 do
		local val = 50 + ( i * 2 )
		surface.SetDrawColor(val, val, val, 255)
		surface.DrawRect(1, y - ( ( i * 2 ) + 1 ), x - 2, 2)
	end
end

/*---------------------------------------------------------
    Button
---------------------------------------------------------*/
function SKIN:PaintButton( PANEL )
	local x, y = PANEL:GetWide(), PANEL:GetTall()
	
	draw.RoundedBox(4, 0, 0, x, y, self.Button_Color_2)
	draw.RoundedBox(4, 2, 2, x -4, y -4, self.Button_Color_1)

	if( PANEL.Hovered ) then
		self.B_Label_Color_1 = Color(0, 255, 0, 255);
		self.Button_Color_2	 = Color(0, 255, 0, 255);
	elseif( !PANEL.Hovered ) then
		self.B_Label_Color_1 = Color(255, 0, 0, 255);
		self.Button_Color_2	 = Color(255, 0, 0, 255);
	end
	
	PANEL:SetTextColor( self.B_Label_Color_1 )
end
derma.DefineSkin("basewars", "Basewars generic skin", SKIN)

